StupidBeauty
Read times:410Posted at:Wed Jul 4 02:49:20 2012
- no title specified

转载:Tcp 断开连接

在TCP连接断开的过程中,通信双方都应当显式地关闭套接字,以便发送出自己这一方的FIN消息。

http://biancheng.dnbcw.info/linux/312594.html

亮点:

在连接撤销过程中,有如下四个过程:




1. HOST1上的应用程序关闭己方的连接导致TCP发送一个FIN消息给HOST2。
2. HOST2发送一个确认消息给HOST1,并且HOST2把FIN作为EOF递交给HOST2上的应用程序。
3. 一段时间过后,HOST2上的应用程序关闭它那边的连接,引发一个FIN消息给HOST1。
4. HOST1给HOST2发送一个确认消息,然后HOST2关闭连接并释放资源,然而,HOST1却没有关闭连接,而是进入了TIME_WAIT状态,并为两个最大段生存时间(2MSL)保留在此状态.
Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4